#  docker push registry.cn-hangzhou.aliyuncs.com/adgw/adgw-system:1.1.2
FROM openjdk:11-jre-slim-buster

RUN echo "deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse" > /etc/apt/sources.list‘
RUN apt-get -y update
RUN apt install -y curl
RUN mkdir -p /api-seed-system

WORKDIR /api-seed-system

ARG JAR_FILE=api-seed-system.jar

COPY ${JAR_FILE} app.jar

COPY application.yml application.yml

EXPOSE 8081

ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms512m -Xmx1024m -Duser.timezone=GMT+8 -Dspring.config.additional-location=/api-seed-system/application.yml -Djava.security.egd=file:/dev/./urandom"

CMD java -jar app.jar $JAVA_OPTS

COPY docker-healthcheck /usr/local/bin/

HEALTHCHECK CMD ["docker-healthcheck"]